Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NZ code density units #147

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Fix NZ code density units #147

merged 1 commit into from
Nov 27, 2024

Conversation

robbievanleeuwen
Copy link
Owner

@robbievanleeuwen robbievanleeuwen commented Nov 7, 2024

Closes #146.

Addresses density being stored inconsistently in the NZ code material objects as kg/m^3 rather than the consistent kg/mm^3. Only the mass per unit length was affected.

@robbievanleeuwen robbievanleeuwen added the bug Something isn't working label Nov 7, 2024
@robbievanleeuwen robbievanleeuwen self-assigned this Nov 7, 2024
@robbievanleeuwen
Copy link
Owner Author

Hi @Agent6-6-6, sorry for the extended absence here. I'm trying to start to tackle some of the outstanding issues and noticed #146. If you have a chance to cast your eye quickly over this I'd appreciate it :) Otherwise I'll probably merge in ~1 week.

@Agent6-6-6
Copy link
Contributor

I did it that way on purpose because that is the units used in the NZ design code and is most familiar to those working in SI units for density. From memory it is used for calculating E of concrete in kg/m3, so if it must be changed then further code updates may be required (I quickly flicked through the code changes you've proposed on my phone but didn't see if that had been changed).

My preference would be it is kept as kg/m3, as this is the proper/official SI units for density even if it isn't strictly compatible with the mm used elsewhere.
https://www.google.com/search?q=si+units+for+density.&oq=si+units+for+density.&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCDU3ODlqMGo5qAIAsAIB&client=ms-android-samsung-ss&sourceid=chrome-mobile&ie=UTF-8

Maybe density is used elsewhere in the world in kg/mm3 though, but I didn't think so. In my view it just avoids a units input issue as you'd expect kg/m3 in design directly without having to modify it in the code back to kg/m3 to use it?

Thoughts?

@robbievanleeuwen
Copy link
Owner Author

I agree that it is best to maintain the input as the more commonly adopted kg/m^3. This proposed pull request does not change the units that the user inputs, however just modifies the back-end such that when the Material object is created the units are converted such that they are consistent.

The main reason for this PR is that the reported results for mass/length are incorrect. As concreteproperties is unit independent the values stored in Material should be consistent with the rest of the units used in the analysis (the design code assumes [mm]).

Let me know if this makes sense :)

@robbievanleeuwen robbievanleeuwen merged commit ef01c2a into master Nov 27, 2024
18 checks passed
@robbievanleeuwen robbievanleeuwen deleted the fix/nz-density branch November 27, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Density in NZ design code in wrong units
2 participants